<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="@{include} :: header"></head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-row">
            <form class="layui-form layui-form-pane" id="signupForm">
                <input id="id" name="id" th:value="${device.id}" type="hidden" />
                <input id="shopId" name="shopId" th:value="${device.shopId}" type="hidden" />
                <div class="layui-form-item">
                    <label class="layui-form-label">设备名称</label>
                    <div class="layui-input-block">
                        <input id="deviceName" name="deviceName" th:value="${device.deviceName}" class="layui-input" type="text">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">设备编码</label>
                    <div class="layui-input-block">
                        <input id="deviceNum" name="deviceNum" th:value="${device.deviceNum}" class="layui-input" type="text" />
                    </div>
                </div>

<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">所属企业</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <select name="shopId" id="shopId" lay-search="">-->
<!--                            <option value="">所属企业</option>-->
<!--                            <th:block th:each="d : ${shops}">-->
<!--                                <option th:value="${d.id}" th:text="${d.shopName}" th:selected="${device.shopId == d.id}"></option>-->
<!--                            </th:block>-->
<!--                        </select>-->
<!--                    </div>-->
<!--                </div>-->

                <div class="layui-form-item">
                    <label class="layui-form-label">设备类型</label>
                    <div class="layui-input-block">
                        <select name="deviceType" id="deviceType" lay-search="">
                            <option value="">请选择设备类型</option>
<!--                            <option value="0">未保养</option>-->
                            <option value="2" th:selected="${device.deviceType == 2}">测温</option>
                            <option value="3" th:selected="${device.deviceType == 3}">测温+电流</option>
                            <option value="4" th:selected="${device.deviceType == 4}">测温+电流+电压</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">位置类型</label>
                    <div class="layui-input-block">
                        <select name="positionType" id="positionType" lay-filter="positionType">
                            <option value="">请选择位置类型</option>
                            <!--                            <option value="0">未保养</option>-->
                            <option value="1" th:selected="${device.positionType == 1}">制粒机检测</option>
                            <option value="2" th:selected="${device.positionType == 2}">锅炉测温</option>
                            <option value="3" th:selected="${device.positionType == 3}">油罐检测</option>
                        </select>
                    </div>
                </div>
<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">自定义增减值</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input id="addValue" name="addValue" th:value="${device.addValue}" class="layui-input" type="number" />-->
<!--                    </div>-->
<!--                </div>-->

                <div class="layui-form-item">
                    <label class="layui-form-label">报警值下限</label>
                    <div class="layui-input-block">
                        <input id="warnMinValue" name="warnMinValue" th:value="${device.warnMinValue}" class="layui-input" type="number" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">报警值上限</label>
                    <div class="layui-input-block">
                        <input id="warnMaxValue" name="warnMaxValue" th:value="${device.warnMaxValue}" class="layui-input" type="number" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">节点数量</label>
                    <div class="layui-input-block">
                        <input id="nodeCount" name="nodeCount" th:value="${device.nodeCount}" class="layui-input" type="number" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">排序索引</label>
                    <div class="layui-input-block">
                        <input id="sort" name="sort" th:value="${device.sort}" class="layui-input" type="number" />
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">设备所在地点</label>
                    <div class="layui-input-block">
                        <input id="address" name="address" th:value="${device.address}" class="layui-input" type="text" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <div style="text-align: center;margin-top: 20px">
                        <button  onclick="update()" class="layui-btn layui-btn-normal" >提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" th:src="@{/js/appjs/module/device/detail.js}"></script>
</body>
</html>
